Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin error message #3437

Merged
merged 13 commits into from
Aug 16, 2022
Merged

Update plugin error message #3437

merged 13 commits into from
Aug 16, 2022

Conversation

piaskowyk
Copy link
Member

@piaskowyk piaskowyk commented Aug 2, 2022

Description

Tree-shaking requires export * as default syntax, but this syntax requires the babel plugin @babel/plugin-proposal-export-namespace-from. Previously I embedded this plugin inside the Reanimated plugin, but this doesn't work when someone doesn't add Reanimated plugin to their project. In this situation, users receive misleading information about syntax errors instead of messages about missing plugin configuration.

Tree-shaking works only for the web, so I used as default syntax only for web implementation. In addition, I updated the exception message.
The file index.web.ts contains information about exceptions in the comment because this is the only possibility to give users information on exceptions during static analyzes of code.

Fixes #3410

Example/package.json Show resolved Hide resolved
docs/docs/fundamentals/installation.md Outdated Show resolved Hide resolved
docs/docs/fundamentals/installation.md Outdated Show resolved Hide resolved
docs/docs/fundamentals/web-support.md Outdated Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
src/index.web.ts Outdated Show resolved Hide resolved
@piaskowyk piaskowyk mentioned this pull request Aug 13, 2022
docs/docs/fundamentals/web-support.md Outdated Show resolved Hide resolved
docs/versioned_docs/version-2.0.x/installation.md Outdated Show resolved Hide resolved
docs/versioned_docs/version-2.2.x/installation.md Outdated Show resolved Hide resolved
docs/versioned_docs/version-2.1.x/installation.md Outdated Show resolved Hide resolved
piaskowyk and others added 6 commits August 16, 2022 10:55
Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
@piaskowyk piaskowyk merged commit 9a6f161 into main Aug 16, 2022
@piaskowyk piaskowyk deleted the @piaskowyk/plugin-error branch August 16, 2022 09:01
piaskowyk added a commit that referenced this pull request Aug 17, 2022
## Description

Tree-shaking requires `export * as default` syntax, but this syntax requires the babel plugin `@babel/plugin-proposal-export-namespace-from`. Previously I embedded this plugin inside the Reanimated plugin, but this doesn't work when someone doesn't add Reanimated plugin to their project. In this situation, users receive misleading information about syntax errors instead of messages about missing plugin configuration.

Tree-shaking works only for the web, so I used `as default` syntax only for web implementation. In addition, I updated the exception message. 
The file `index.web.ts` contains information about exceptions in the comment because this is the only possibility to give users information on exceptions during static analyzes of code.

Fixes #3410
j-piasecki added a commit to software-mansion/react-native-gesture-handler that referenced this pull request Oct 21, 2022
## Description

This PR fixes the order of babel plugins and adds
`@babel/plugin-proposal-export-namespace-from` to make the new versions
of Reanimated work on web.

See
software-mansion/react-native-reanimated#3437
for more information.

## Test plan

Run example apps
byCedric added a commit to expo/snack that referenced this pull request Nov 10, 2022
* fix(runtime): drop sdkVersion from app.json

* refactor(runtime): upgrade to Expo SDK 47 beta

* refactor(runtime): update patches to used package versions

* refactor(snack-content): upgrade to Expo SDK 47 beta

* refactor(snack-sdk): upgrade bundled native modules fixture to Expo SDK 47 beta

* test(snack-sdk): update the tests for Expo SDK 47 beta

* docs(snack-sdk): add changelog entries

* refactor(website): upgrade to Expo SDK 47 beta

* fix(runtime): use event subscriptions in app

* fix(runtime: change barcode scanned types to match code

* test(snackager): update to Expo SDK 47 beta

* docs: update changelogs to include pr

* fix(runtime): work around reanimated issue #3437

See: software-mansion/react-native-reanimated#3437
See: https://github.com/expo/expo/pull/19305\#issuecomment-1263114915

* fix(runtime): fix deployment script removing sdkVersion usage

* refactor(runtime): update dependencies for SDK 47 stable

* refactor(snack-sdk): upgrade bundled native modules fixture to Expo SDK 47 stable

* test(snack-sdk): update the tests for Expo SDK 47 stale
fluiddot pushed a commit to wordpress-mobile/react-native-reanimated that referenced this pull request Jun 5, 2023
## Description

Tree-shaking requires `export * as default` syntax, but this syntax requires the babel plugin `@babel/plugin-proposal-export-namespace-from`. Previously I embedded this plugin inside the Reanimated plugin, but this doesn't work when someone doesn't add Reanimated plugin to their project. In this situation, users receive misleading information about syntax errors instead of messages about missing plugin configuration.

Tree-shaking works only for the web, so I used `as default` syntax only for web implementation. In addition, I updated the exception message. 
The file `index.web.ts` contains information about exceptions in the comment because this is the only possibility to give users information on exceptions during static analyzes of code.

Fixes software-mansion#3410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants